#ifndef _________MOTOR_TIMER_H_________
#define _________MOTOR_TIMER_H_________ 

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

#include "stm32f1xx_hal.h"
#include "timer.h"

typedef struct {
    TIM_HandleTypeDef* htim;
    void (*callback)(void);
} motor_timer_t;

void motor_timer_init(void);
void motor_timer_start(void);
void motor_timer_stop(void);
void motor_timer_set_period(uint32_t period);
void motor_timer_set_callback(void (*callback)(void));


#ifdef __cplusplus
}
#endif // __cplusplus

#endif // _________MOTOR_TIMER_H_________
